Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

markdown-table

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-table

Generate a markdown (GFM) table

  • 3.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.5M
decreased by-10.8%
Maintainers
1
Weekly downloads
 
Created

What is markdown-table?

The markdown-table npm package is a utility for generating tables in Markdown format. It allows users to create well-formatted Markdown tables from arrays of data, providing options to customize alignment and padding.

What are markdown-table's main functionalities?

Basic Table Creation

This feature allows the creation of a basic Markdown table from an array of arrays. Each sub-array represents a row in the table.

const markdownTable = require('markdown-table');

const table = markdownTable([
  ['Branch', 'Commit'],
  ['master', '0123456789abcdef'],
  ['staging', 'fedcba9876543210']
]);

console.log(table);

Custom Alignment

This feature enables the specification of alignment for each column in the table. 'l' stands for left, 'c' for center, and 'r' for right.

const markdownTable = require('markdown-table');

const table = markdownTable(
  [
    ['Feature', 'Support'],
    ['Tables', 'Yes'],
    ['Alignment', 'Yes']
  ],
  { align: ['l', 'c'] }
);

console.log(table);

Other packages similar to markdown-table

Keywords

FAQs

Package last updated on 22 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc